package quickup;

import java.net.MalformedURLException;
import java.net.URL;

public class HttpDestination {
	private String path;
	private String username;
	private String password;
	private boolean auth;
	
	public HttpDestination(String url) {
		path = url;
		username = null;
		password = null;
		auth = false;
	}
	
	public HttpDestination(String url, String user, String pass) {
		path = url;
		username = user;
		password = pass;
		auth = true;
	}

	public boolean isAuthRequired() {return auth;}
	public URL getURL() throws MalformedURLException {return new URL(path);}
	public String getPassword() {return password;}
	public void setPassword(String password) {this.password = password;}
	public String getPath() {return path;}
	public void setPath(String path) {this.path = path;}
	public String getUsername() {return username;}
	public void setUsername(String username) {this.username = username;}
}
